/* =====================================================
   BASIC RESET
===================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: Arial, Helvetica, sans-serif; background: #f7f7f5; color: #111; padding-bottom: 75px; }
button { font-family: inherit; cursor: pointer; }
a { text-decoration: none; color: inherit; }

/* =====================================================
   STANDARD HEADER (SHARED)
===================================================== */
.header { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,.95); backdrop-filter: blur(12px); border-bottom: 1px solid #e5e5e5; }
.header-inner { width: 100%; max-width: 1200px; min-height: 75px; margin: auto; padding: 12px 20px; display: flex; align-items: center; gap: 20px; }
.logo { display: flex; align-items: center; gap: 8px; color: #111; font-size: 20px; font-weight: 900; letter-spacing: -1px; white-space: nowrap; }
.logo span { width: 32px; height: 32px; display: grid; place-items: center; background: #dfff00; color: #111; border-radius: 7px; font-size: 16px; font-weight: 900; }
.search-box { flex: 1; max-width: 450px; margin: auto; }
.search-box input { width: 100%; padding: 12px 16px; border: 1px solid #ddd; border-radius: 10px; background: white; outline: none; font-size: 13px; transition: .2s; }
.search-box input:focus { border-color: #111; box-shadow: 0 0 0 3px rgba(223,255,0,.35); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.wishlist-btn, .cart-btn { width: 42px; height: 42px; border: 0; border-radius: 9px; background: #f2f2f2; font-size: 18px; position: relative; transition: .2s; }
.wishlist-btn:hover, .cart-btn:hover { background: #dfff00; transform: translateY(-2px); }
.cart-badge { position: absolute; top: -5px; right: -5px; width: 20px; height: 20px; display: grid; place-items: center; background: #dfff00; color: #111; border-radius: 50%; font-size: 10px; font-weight: 900; }
.auth-btn { background: #dfff00; color: #111; padding: 12px 20px; border: 2px solid #dfff00; border-radius: 8px; font-size: 12px; font-weight: 900; transition: .2s; }
.auth-btn:hover { background: #111; color: #dfff00; }

/* ACCOUNT DROPDOWN */
.account-menu { position: relative; }
.account-dropdown { position: absolute; top: calc(100% + 10px); right: 0; width: 260px; padding: 10px; background: #fff; color: #222; border: 1px solid #e5e5e5; border-radius: 12px; box-shadow: 0 12px 35px rgba(0,0,0,.15); z-index: 99999; }
.account-dropdown[hidden] { display: none !important; }
.account-dropdown-header { padding: 12px; border-bottom: 1px solid #eee; margin-bottom: 6px; overflow-wrap: anywhere; }
.account-dropdown-header strong, .account-dropdown-header small { display: block; }
.account-dropdown-header small { margin-top: 6px; color: #666; white-space: pre-line; }
.account-dropdown button { display: block; width: 100%; padding: 12px; border: 0; border-radius: 7px; background: transparent; color: #222; text-align: left; font: inherit; cursor: pointer; }
.account-dropdown button:hover { background: #f3f3f3; }

/* =====================================================
   HERO & FORM (PRE-ORDER)
===================================================== */
.hero { max-width: 1200px; margin: 25px auto 0; padding: 65px 55px; border-radius: 22px; background: #111; color: #fff; overflow: hidden; }
.hero-content { max-width: 850px; }
.hero-tag { display: inline-block; color: #111; background: #dfff00; padding: 8px 13px; border-radius: 7px; font-size: 11px; font-weight: 900; letter-spacing: .5px; margin-bottom: 22px; }
.hero h1 { font-size: clamp(48px,7vw,82px); line-height: .9; letter-spacing: -4px; font-weight: 900; margin-bottom: 25px; }
.hero h1 span { color: #dfff00; }
.hero p { color: #cfcfcf; font-size: 16px; line-height: 1.7; max-width: 650px; }
.hero-points { display: flex; gap: 35px; margin-top: 40px; flex-wrap: wrap; }
.hero-points div { display: flex; flex-direction: column; gap: 5px; }
.hero-points strong { color: #dfff00; font-size: 13px; }
.hero-points span { color: #fff; font-size: 12px; font-weight: 700; }

.preorder-section { max-width: 850px; margin: 75px auto; padding: 0 25px; }
.section-heading { text-align: center; margin-bottom: 40px; }
.section-heading span { font-size: 10px; font-weight: 900; letter-spacing: 2px; color: #777; }
.section-heading h2 { font-size: 34px; letter-spacing: -1.5px; margin: 10px 0; }
.section-heading p { color: #777; font-size: 14px; }

.preorder-form { background: #fff; border: 1px solid #e7e7e7; border-radius: 18px; padding: 35px; box-shadow: 0 15px 40px rgba(0,0,0,.05); }
.form-group { margin-bottom: 23px; }
.form-group label { display: block; font-size: 12px; font-weight: 900; margin-bottom: 9px; }
.form-group label span { color: #d00000; }
.form-group label small { color: #999; font-weight: 500; }
input, textarea { width: 100%; border: 1px solid #ddd; background: #fafafa; padding: 14px 15px; border-radius: 10px; font-family: inherit; font-size: 14px; outline: none; transition: .2s; }
input:focus, textarea:focus { border-color: #111; background: #fff; }
textarea { min-height: 120px; resize: vertical; }

#productImage { display: none; }
.upload-box { min-height: 230px; border: 2px dashed #d5d5d5; border-radius: 15px; display: flex !important; align-items: center; justify-content: center; flex-direction: column; cursor: pointer; background: #fafafa; overflow: hidden; position: relative; transition: .25s; }
.upload-box:hover { border-color: #111; background: #f5f5f5; }
.upload-box.has-image { border-style: solid; border-color: #dfff00; }
.upload-icon { width: 55px; height: 55px; display: grid; place-items: center; background: #dfff00; border-radius: 50%; font-size: 25px; margin-bottom: 13px; }
.upload-box strong { font-size: 14px; }
.upload-box small { color: #888; font-size: 11px; margin-top: 7px; }
#imagePreview { display: none; width: 100%; height: 230px; object-fit: contain; background: #f5f5f5; }
#imagePreview.show { display: block; }
.upload-box.has-image .upload-icon, .upload-box.has-image strong, .upload-box.has-image small { display: none; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.check-row { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 25px; cursor: pointer; }
.check-row input { width: 17px; height: 17px; margin-top: 1px; accent-color: #111; }
.check-row span { font-size: 11px; line-height: 1.5; color: #666; }

.submit-btn { width: 100%; border: 0; background: #dfff00; color: #111; padding: 17px; border-radius: 10px; font-size: 13px; font-weight: 900; cursor: pointer; transition: .2s; }
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.secure-note { text-align: center; color: #999; font-size: 10px; margin-top: 15px; }

/* SUCCESS MODAL */
.success-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.75); backdrop-filter: blur(7px); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 5000; }
.success-overlay.show { display: flex; }
.success-card { width: 100%; max-width: 460px; background: #fff; border-radius: 20px; padding: 40px; text-align: center; }
.success-icon { width: 65px; height: 65px; background: #dfff00; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 20px; font-size: 30px; font-weight: 900; }
.success-tag { font-size: 10px; font-weight: 900; letter-spacing: 2px; color: #777; }
.success-card h2 { font-size: 30px; margin: 10px 0; }
.success-card p { color: #666; line-height: 1.6; font-size: 13px; }
.reference { background: #f5f5f5; padding: 15px; border-radius: 10px; margin: 22px 0; font-size: 12px; }
.reference strong { display: block; margin-top: 5px; font-size: 20px; }
.success-btn { display: block; background: #111; color: #fff; text-decoration: none; padding: 14px; border-radius: 10px; font-size: 12px; font-weight: 900; }

/* =====================================================
   STANDARD CART DRAWER (SHARED)
===================================================== */
.cart { position: fixed; top: 0; right: 0; width: 420px; max-width: 100%; height: 100vh; background: white; z-index: 5000; display: flex; flex-direction: column; box-shadow: -15px 0 50px rgba(0,0,0,.15); transform: translateX(105%); transition: .35s; }
.cart.open { transform: translateX(0); }
.cart-header { height: 70px; padding: 15px 20px; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between; }
.cart-header h2 { font-size: 19px; font-weight: 900; }
.cart-header button { width: 35px; height: 35px; border: 0; background: #f2f2f2; border-radius: 8px; font-size: 24px; }
.cart-items { flex: 1; overflow-y: auto; padding: 20px; }
.empty-cart { text-align: center; padding-top: 100px; color: #888; }
.cart-item { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 0; border-bottom: 1px solid #eee; }
.cart-item-info { flex: 1; }
.cart-item-info strong { display: block; font-size: 13px; margin-bottom: 5px; }
.cart-item-info small { display: block; color: #777; font-size: 11px; }
.cart-item-actions { display: flex; align-items: center; gap: 6px; }
.cart-item-actions button:not(.remove) { width: 28px; height: 28px; border: none; background: #111; color: #fff; border-radius: 6px; font-size: 16px; }
.cart-item-actions button:not(.remove):hover { background: #dfff00; color: #000; }
.cart-item-actions span { min-width: 22px; text-align: center; font-size: 13px; font-weight: 800; }
.cart-item-actions .remove { border: none; background: none; color: #e63946; font-size: 11px; font-weight: 700; }
.checkout-form { padding: 18px 20px; border-top: 1px solid #eee; background: #fff; }
.checkout-form h3 { margin-bottom: 14px; font-size: 15px; font-weight: 900; }
.checkout-form input, .checkout-form textarea { display: block; width: 100%; padding: 11px 13px; margin-bottom: 10px; border: 1px solid #ddd; border-radius: 8px; background: #fff; color: #111; font-family: inherit; font-size: 13px; outline: none; }
.checkout-form input:focus, .checkout-form textarea:focus { border-color: #111; box-shadow: 0 0 0 2px rgba(223,255,0,.35); }
.cart-footer { padding: 20px; border-top: 1px solid #eee; background: white; }
.total { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; font-size: 13px; }
.total strong { font-size: 17px; }
.checkout { width: 100%; padding: 15px; border: 0; border-radius: 8px; background: #111; color: #dfff00; font-size: 12px; font-weight: 900; transition: .2s; }
.checkout:hover { background: #dfff00; color: #111; }
.checkout-supabase { margin-bottom: 8px; }
.checkout-whatsapp { background: #25D366; color: #ffffff; }
.checkout-whatsapp:hover { background: #1ebe5d; color: #ffffff; transform: translateY(-1px); }

/* =====================================================
   STANDARD FOOTER & BOTTOM NAV (SHARED)
===================================================== */
footer { background: white; padding: 50px 0 25px; }
.footer { width: 100%; max-width: 1200px; margin: auto; padding: 0 20px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-brand p { color: #777; font-size: 12px; max-width: 320px; margin-top: 12px; line-height: 1.6; }
.footer h4 { margin-bottom: 15px; font-size: 14px; }
.footer a { display: block; color: #777; font-size: 12px; margin: 9px 0; transition: .2s; }
.footer a:hover { color: #111; }
.copyright { max-width: 1200px; margin: 40px auto 0; padding: 20px; border-top: 1px solid #eee; text-align: center; color: #999; font-size: 10px; line-height: 1.8; }
.bottom-nav { display: none; }

/* TOAST */
.toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); background: #111; color: white; padding: 13px 20px; border-radius: 50px; font-size: 11px; font-weight: 800; z-index: 6000; box-shadow: 0 10px 30px rgba(0,0,0,.2); white-space: nowrap; opacity: 0; pointer-events: none; transition: all .3s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =====================================================
   MOBILE RESPONSIVENESS
===================================================== */
@media(max-width: 800px) {
    .header-inner { flex-wrap: wrap; padding: 10px 20px; }
    .logo { order: 1; }
    .header-actions { order: 2; margin-left: auto; }
    .search-box { order: 3; flex-basis: 100%; max-width: none; margin: 0 0 4px; }
    
    .hero { margin: 15px; padding: 45px 25px; }
    .hero h1 { font-size: 52px; letter-spacing: -3px; }
    .hero-points { gap: 20px; }
    .preorder-section { margin-top: 55px; }
    
    .form-row { grid-template-columns: 1fr; gap: 0; }
    
    .footer { grid-template-columns: 1fr 1fr; gap: 25px; }
    .footer-brand { grid-column: 1/-1; }
}

@media(max-width: 600px) {
    body { padding-bottom: 70px; }
    
    .logo { font-size: 17px; }
    .auth-btn { padding: 10px 12px; font-size: 10px; }
    .wishlist-btn, .cart-btn { width: 38px; height: 38px; font-size: 16px; }
    
    .bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; height: 65px; background: white; border-top: 1px solid #e5e5e5; box-shadow: 0 -5px 20px rgba(0,0,0,.06); z-index: 4500; display: flex; align-items: center; justify-content: space-around; }
    .bottom-nav a, .bottom-nav button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; color: #666; font-size: 10px; }
    .bottom-nav span { font-size: 19px; }
    .bottom-nav a.active, .bottom-nav button:hover { color: #111; }
    
    .cart { width: 100%; }
    
    .hero { border-radius: 17px; }
    .hero h1 { font-size: 45px; }
    .hero p { font-size: 14px; }
    
    .preorder-form { padding: 22px; border-radius: 15px; }
    .section-heading h2 { font-size: 28px; }
}

@media(max-width: 380px) {
    .hero h1 { font-size: 39px; }
    .hero-points { flex-direction: column; gap: 14px; }
    .preorder-form { padding: 17px; }
}
